<@override name="link">
</@override>
<@override name="body">
    <body class="gray-bg">
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>公文的列表</h5>
                </div>
                <div class="ibox-content">
                    <form action="transect.html" method="get">
                        <div class="row">
                            <div class="tabs-container">
                                <ul class="nav nav-tabs">
                                    <#list types as type>
                                        <li <#if currentType==type.code> class="active" </#if>>
                                            <a href="transect.html?type=${type.code}">
                                                ${type.message}
                                            </a>
                                        </li>
                                    </#list>
                                </ul>

                            </div>
                            <div class="row" style="margin-top: 5px">
                                <div class="col-sm-9 m-b-xs"></div>
                                <div class="col-sm-3">
                                    <div class="input-group">
                                        <input type="hidden" name="pageNumber" id="pageNumber" value="${pageable.pageNumber}">
                                        <input type="hidden" name="pageSize" id="pageSize" value="${pageable.pageSize}">
                                        <input type="text" placeholder="名称/标题" name="key" value="<#if key??>${key}</#if>" class="input-sm form-control">
                                        <input type="hidden" name="type" value="<#if type??>${type}</#if>">
                                        <span class="input-group-btn">
                                        <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
                                    </span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                    <table class="table table-striped ">
                        <thead>
                            <tr>
                                <td>编码</td>
                                <td>名称</td>
                                <td>标题</td>
                                <td>步骤</td>
                                <td>发起人</td>
                                <td>创建时间</td>
                                <td>操作</td>
                            </tr>
                        </thead>
                        <tbody>
                            <#list page.contents as apps>
                                <tr>
                                    <td>${apps.number?c}</td>
                                    <td>${apps.name}</td>
                                    <td>${apps.title}</td>
                                    <td>
                                        第
                                        <span class="text text-danger" style="font-size: 18px; font-weight: bold;">
                                            ${apps.personnel.flow.num}
                                        </span>
                                        步 <span style="font-weight: bold">${apps.personnel.flow.name}</span>
                                    </td>
                                    <td>
                                        <span class="text text-danger">
                                            <#if apps.personnel.flow.issue.info??>
                                                ${apps.personnel.flow.issue.info.realName}
                                                <#else>
                                                管理员
                                            </#if>
                                        </span>
                                    </td>
                                    <td>
                                        <#setting datetime_format="yyyy年MM月dd">
                                        ${apps.issueTime?number_to_datetime}
                                    </td>
                                    <td>
                                        <#if apps.personnel.flow.flowStatus==2>
                                            <span class="text text-danger">流程结束</span>
                                        <#elseif apps.personnel.flow.flowStatus==3>
                                            <span class="text text-danger">流程回退</span>
                                        <#else>
                                        <#if apps.appsType==0 || apps.appsType==3>
                                            <a href="add.html?id=${apps.id}" class="btn btn-xs btn-primary">
                                                办理
                                            </a>
                                        </#if>
                                        </#if>
                                    <a href="view.html?id=${apps.id}" class="btn btn-xs btn-primary">
                                        查看
                                    </a>
                                    </td>
                                </tr>
                            </#list>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </body>
</@override>
<@override name="script">
</@override>
<@extends name="../base/main.html"/>